import request from '@/utils/request'
/* 列表*/
export function getList(data) {
	return request({
		url: '/admin/member/lists',
		method: 'get',
		params: data
	})
}
// 详情
export function getInfo(data) {
	return request({
		url: '/admin/member/detail',
		method: 'get',
		params: data
	})
}
export function changeStatus(data) {
	return request({
		url: '/admin/member/close_or_open',
		method: 'post',
		data
	})
}
// 赞助商列表
export function sponsorList(data) {
	return request({
		url: '/admin/sponsor/lists',
		method: 'get',
		params: data
	})
}
// 赞助商详情
export function getSponsorDetail(data) {
	return request({
		url: '/admin/sponsor/detail',
		method: 'get',
		params: data
	})
}
// 新增赞助商
export function addSponsor(data) {
	return request({
		url: '/admin/sponsor/add',
		method: 'post',
		data
	})
}
// 编辑赞助商
export function editSponsor(data) {
	return request({
		url: '/admin/sponsor/edit',
		method: 'post',
		data
	})
}
// 停用/启用赞助商
export function changeSponsor(data) {
	return request({
		url: '/admin/sponsor/is_close',
		method: 'post',
		data
	})
}
// 绑定赛事
export function bindRace(data) {
	return request({
		url: '/admin/sponsor/bind_race',
		method: 'post',
		data
	})
}
// 绑定赛事
export function unbindRace(data) {
	return request({
		url: '/admin/sponsor/unbind_race',
		method: 'post',
		data
	})
}
// 已绑定赛事
export function getBindRace(data) {
	return request({
		url: '/admin/sponsor/get_race_lists',
		method: 'get',
		params: data
	})
}
// 增加名额
export function sendQuota(data) {
	return request({
		url: '/admin/sponsor/send_quota',
		method: 'post',
		data
	})
}
// 导入名额
export function importPlayer(data) {
	return request({
		url: '/admin/sponsor/import_player',
		method: 'post',
		data
	})
}

// 历史成绩
export function historyScore(data) {
	return request({
		url: '/admin/member/history',
		method: 'get',
		params: data
	})
}
// 生成证书
export function createCert(data) {
	return request({
		url: `/create_cert/${data.order_id}/${data.player_id}`,
		method: 'get',
		params: data
	})
}
// 生成证书
export function sendLists(data) {
	return request({
		url: `/admin/message/send_lists`,
		method: 'get',
		params: data
	})
}